﻿using Basic.FlowRemoteModel.NodeEvent;
using Basic.FlowRemoteModel.NodeEvent.Model;
using Basic.FlowService.Interface;
using WeDonekRpc.Client.Interface;

namespace Basic.FlowService.RpcEvent
{
    internal class NodeEventEvent : IRpcApiService
    {
        private readonly IFlowNodeEventService _Service;

        public NodeEventEvent ( IFlowNodeEventService service )
        {
            this._Service = service;
        }

        public void DeleteFlowNodeEvent ( DeleteFlowNodeEvent obj )
        {
            this._Service.Delete(obj.Id);
        }

        public NodeEventDto[] GetFlowNodeEventList ( GetFlowNodeEventList obj )
        {
            return this._Service.Gets(obj.NodeId);
        }

        public bool SetFlowNodeEvent ( SetFlowNodeEvent obj )
        {
            return this._Service.Set(obj.Datum);
        }
    }
}
